package cn.humaohua.study.yanmo_design_pattern.ch14.v1;

public class Client {
    public static void main(String[] args) {
        Client client = new Client();
        client.someOperation();
    }

    public void someOperation() {
        String[] names = {"zhang3", "li4", "wang5"};
        Aggregate aggregate = new ConcreteAggregate(names);
        Iterator it = aggregate.createIterator();
        it.first();
        while (!it.isDone()) {
            Object obj = it.currentItem();
            System.out.println(String.format("the obj==%s", obj));
            it.next();
        }
    }
}
